{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f8493093",
   "metadata": {},
   "source": [
    "\\"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c7590c88",
   "metadata": {},
   "source": [
    "# AlexNet\n",
    "## 该网络的特点\n",
    "* 首次使用GPU训练\n",
    "* 使用ReLu作为激活函数\n",
    "* 使用LRN局部响应归一化\n",
    "* 在全连接前两层使用Dropout随机失活神经元减少过拟合"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e60ac8d5",
   "metadata": {},
   "source": [
    "## 过拟合\n",
    "\n",
    "### 过拟合\n",
    "由于\n",
    "* 特征维度过多\n",
    "* 模型的假设过于复杂\n",
    "* 参数过多但是训练数据太少\n",
    "* 噪声过多\n",
    "\n",
    "等原因导致函数完美预测了训练集，但是对新的数据集预测结果差，过度拟合了训练数据却没有考虑到模型的泛化能力。\n",
    "\n",
    "### Dropout\n",
    "\n",
    "在正向传播时随即失活一部分神经元，减少了训练的参数"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2c0c156f",
   "metadata": {},
   "source": [
    "## AlexNet网络结构\n",
    "\n",
    "### Conv1\n",
    "Kernel : 48*2 = 96\n",
    "\n",
    "Kernel_Size: 11\n",
    "\n",
    "padding: [1,2]\n",
    "\n",
    "stride: 4\n",
    "\n",
    "input_size (224,224,3)\n",
    "\n",
    "output_size (55,55,96)\n",
    "\n",
    "### MaxPool1\n",
    "Kernel_Size: 3\n",
    "\n",
    "padding: 0\n",
    "\n",
    "stride: 2\n",
    "\n",
    "input_size (55,55,96)\n",
    "\n",
    "output_size (27,27,96)\n",
    "\n",
    "### Conv2\n",
    "Kernel : 128*2 = 256\n",
    "\n",
    "Kernel_Size: 5\n",
    "\n",
    "padding: [2,2]\n",
    "\n",
    "stride: 1\n",
    "\n",
    "input_size (27,27,96)\n",
    "\n",
    "output_size (27,27,256)\n",
    "\n",
    "### MaxPool2\n",
    "Kernel_Size: 3\n",
    "\n",
    "padding: 0\n",
    "\n",
    "stride: 2\n",
    "\n",
    "input_size (27,27,256)\n",
    "\n",
    "output_size (13,13,256)\n",
    "\n",
    "### Conv3\n",
    "Kernel : 192*2 = 384\n",
    "\n",
    "Kernel_Size: 3\n",
    "\n",
    "padding: [1,1]\n",
    "\n",
    "stride: 1\n",
    "\n",
    "input_size (13,13,256)\n",
    "\n",
    "output_size (13,13,384)\n",
    "\n",
    "### Conv4\n",
    "Kernel : 192*2 = 384\n",
    "\n",
    "Kernel_Size: 3\n",
    "\n",
    "padding: [1,1]\n",
    "\n",
    "stride: 1\n",
    "\n",
    "input_size (13,13,384)\n",
    "\n",
    "output_size (13,13,384)\n",
    "\n",
    "### Conv5\n",
    "Kernel : 128*2 = 256\n",
    "\n",
    "Kernel_Size: 3\n",
    "\n",
    "padding: [1,1]\n",
    "\n",
    "stride: 1\n",
    "\n",
    "input_size (13,13,384)\n",
    "\n",
    "output_size (13,13,256)\n",
    "\n",
    "### MaxPool3\n",
    "Kernel_Size: 3\n",
    "\n",
    "padding 0\n",
    "\n",
    "stride: 2\n",
    "\n",
    "input_size (13,13,384)\n",
    "\n",
    "output_size (6,6,256)\n",
    "\n",
    "### FC\n",
    "\n",
    "1. Layer1:\n",
    "input_size 6*6*256 = 9216 -> output_size 4096\n",
    "\n",
    "2. Layer2:\n",
    "input_size 4096 -> output_size 4096\n",
    "\n",
    "3. Layer3:\n",
    "input_size 4096 -> output_size classes num"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "49ee3af7",
   "metadata": {},
   "source": [
    "# 花分类数据集\n",
    "Download：https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  },
  "latex_envs": {
   "LaTeX_envs_menu_present": true,
   "autoclose": false,
   "autocomplete": true,
   "bibliofile": "biblio.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 1,
   "hotkeys": {
    "equation": "Ctrl-E",
    "itemize": "Ctrl-I"
   },
   "labels_anchors": false,
   "latex_user_defs": false,
   "report_style_numbering": false,
   "user_envs_cfg": false
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
